{% extends "tpl_admin_base.html" %}
{% block javascript %}
 <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
 <script type="text/javascript">
  function createEditor() {
      var oFCKeditor = new FCKeditor('editorHtml');
      oFCKeditor.BasePath = "/fckeditor/";
      oFCKeditor.Height = 328;
      oFCKeditor.ReplaceTextarea();
    }

    function initFunc(){
    	node = document.getElementById('editorHtml')
    	if(typeof(node) !== 'undefined' && node != null)
    	{
    		createEditor();  
        } 
    }
  </script>
  {{ block.super }}
{% endblock %}
{% block slides %}
<div id="slogancontainer" class="slides">
 	<img src="/static/images/slogan_3.png" alt="内容管理" class="left" />
 </div>
{% endblock %}
{% block nodecontent %}
<div class="article">
	{% ifnotequal success None %}
	<div class="resultmsg">{% if success %}更新成功{% else %}更新失败，请重试{% endif %}</div>
	{% endifnotequal %}
	<div class="formcontainer">
	{% ifnotequal column None %}
		<div><a href="{{request.path}}">返回栏目列表</a></div>
		<form action="{{ request.path }}"
        method="post"
        enctype="multipart/form-data"
        id="editForm">
        <div class="inputcontainer singleline">
	        <label for="input_column">栏目名称：</label>
	        <div class="title">{{column.title}}</div>
	        <input type="hidden" name="columnkey" value="{{column.key}}"/>
        </div>
        <div class="editor">
        <div>栏目内容</div>
         <textarea id="editorHtml" name="editorHtml">
         {% ifnotequal column.content None %}
         {{column.content}}
         {% endifnotequal %}
    	 </textarea>
    	 </div>
    		<div class="inputcontainer singleline"><input type="submit" name="submit" value="提交" width="100"／></div>
       </form>
     {% endifnotequal %}
     {% ifnotequal columns None %}
     	<div>选择需要编辑内容的栏目</div>
     	<ul>
     	{% for item in columns %}
     		{% if not item.subsupport %}
     		<li><a href="{{request.path}}?column={{item.key|escape}}">{{item.title}}</a></li>
     		{% endif %}
     	{% endfor %}
     	</ul>
     {% endifnotequal %}
	</div>
</div>
{% endblock %}